﻿namespace OasisCiq.Xpil
{
    using System.Collections.Specialized;
    using CommonTypes;
    using External;
    using XS;

    /// <summary>
    /// Name of the language spoken by the person
    /// </summary>
    public class Language : CTString, IDataQualityGroup, IExtendedAttributes
    {
        public Language(string value)
            : base(value)
        {
        }

        /// <summary>
        /// Mother tongue, by birth, etc
        /// </summary>
        public virtual LanguageTypeList Type { get; set; }

        /// <summary>
        /// Indicates ability to speak: yes, no, poor, good, bad, average
        /// </summary>
        public virtual LanguageSkillsList Speak { get; set; }

        /// <summary>
        /// Indicates ability to read: yes, no, poor, good, bad, average
        /// </summary>
        public virtual LanguageSkillsList Read { get; set; }

        /// <summary>
        /// Indicates ability to write: yes, no, poor, good, bad, average
        /// </summary>
        public virtual LanguageSkillsList Write { get; set; }

        /// <summary>
        /// Indicates ability to understand speech: yes, no, poor, good, bad, average
        /// </summary>
        public virtual LanguageSkillsList Understand { get; set; }

        /// <summary>
        /// Indicates preferred language of communication (read and/or write and/or speak)
        /// </summary>
        public virtual LanguagePreferenceList Preference { get; set; }

        /// <summary>
        /// This attribute indicates what level of trust can be given to the parent element.
        /// Omit this attribute if the data quality is unknown. If the data quality is known,
        /// the value is "Valid, else "InValid"
        /// </summary>
        public virtual DataQualityTypeList DataQualityType { get; set; }

        /// <summary>
        /// Date the data quality is valid from
        /// </summary>
        public virtual XSDateTime ValidFrom { get; set; }

        /// <summary>
        /// Date the data quality is valid to
        /// </summary>
        public virtual XSDateTime ValidTo { get; set; }

        public virtual NameValueCollection ExtendedAttributes { get; set; }
    }
}
